import request from '@/utils/request'

// 获取退货单列表
export function OrderRefundList(params) {
  return request({
    url: '/refund/order_refund_list',
    method: 'get',
    params
  })
}
// 打印一个退货单
export function getPrintRefund(data) {
  return request({
    url: 'refund/print_order_detail/' + data.order_refund_id,
    method: 'get',
    data
  })
}
// 作废退货单GetOrderRefundList
export function cancelOrderRefund(data) {
  return request({
    url: '/refund/cancel_order_refund/' + data.order_refund_id,
    method: 'put',
    data
  })
}
// 修改退货订单商品的备注
export function editRefundItemRemark(data) {
  return request({
    url: '/refund/edit_refund_item_remark/' + data.id,
    method: 'put',
    data
  })
}
// 新增一个退货单
export function AddOrderRefund(data) {
  return request({
    url: '/refund/add_order_refund',
    method: 'post',
    data
  })
}
// 获取单个退货单的详情信息
export function OrderRefundDetail(params) {
  return request({
    url: '/refund/get_order_refund_detail/' + params.order_refund_id,
    method: 'get',
    params
  })
}
// 退货单收款确认
export function PassOrderRefund(data) {
  return request({
    url: '/refund/confirm_refund_pay/' + data.order_refund_id,
    method: 'put',
    data
  })
}
// 退货单的退款记录
export function getRefundBalanceList(params) {
  return request({
    url: '/refund/get_refund_balance_list/' + params.order_refund_id,
    method: 'get',
    params
  })
}
// 修改退货单备注
export function editRefundRemark(data) {
  return request({
    url: '/refund/edit_refund_remark/' + data.id,
    method: 'put',
    data
  })
}
